package com.game.logic.fighting.skill.skill;


import com.game.dao.core.GameDao;
import com.game.dao.user.roles.RolesDao;
import jakarta.annotation.Resource;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.experimental.FieldDefaults;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/// 宠物技能事件
@Slf4j
@Component
public class PetSkillsEventHandler {
    @Resource
    private RolesDao rolesDao;
    @Resource
    private GameDao gameDao;

    @EventListener(classes = PetSkillsEvent.class)
    public void tryUseSkill(PetSkillsEvent event) {
    }

    @Getter
    @FieldDefaults(level = AccessLevel.PUBLIC)
    public static class PetSkillsEvent extends ApplicationEvent {
        Integer anchorInfoId;
        Integer userInfoId;

        public PetSkillsEvent(Object source) {
            super(source);
        }

        public PetSkillsEvent init( Integer anchorInfoId, Integer id) {
            this.anchorInfoId = anchorInfoId;
            this.userInfoId = id;
            return this;
        }
    }
}
